home *** CD-ROM | disk | FTP | other *** search
- rem $linesize:132
- rem $title:'Application Engineer Standard Routines'
- rem $subtitle:'Create an index (Verbose)'
- '
- ' bit.creat completed on 8-apr-86
- '
- ' Include the COMMON values
- rem $include:'AESHARED.BAS'
-
-
- sub bit.creat static
- idxk%=0
- ptl%=0
- ptr%=0
- parent%=0
- pointer%=0
- stat%=0
- print "binary tree creation routine.":print
- hdr:
- input "name of header file ",hdr$
- mas$=hdr$+".idx":hdr$=hdr$+".hdr"
- print "master index is ";mas$;" and"
- print "header is : ";hdr$;" ==> correct (y/n) ";
-
- a$=input$(1)
- if a$="n" or a$="n" then
- goto hdr
- end if
- klength:
- input "length of key ",idxk%
- if idxk%>3 and idxk%<256 then
- goto okay
- end if
- print "key size is outside the bounds of intelligence"
- print "key size must be less than 256 and greater than 3"
- goto klength
- okay:
- print "actual index master file record size is";
- recsize%=idxk%+2+2+2+2+2
- print recsize%
- doit:
- print "please wait, file being initialized"
- '
- ' create the header first, then open the idx master.
-
- open "o",1,hdr$
- close 1
- open "r",1,hdr$,512
- field #1,32 as desc$,32 as xmast$,2 as klen$,2 as nok$,2 as nexav$
- field #1,70 as twit$,2 as kdel$,440 as spare$
- lset desc$="(c) R.Barrow 1986,1987"+chr$(26)
- lset xmast$=mas$
- lset klen$=mki$(idxk%)
- lset nok$=mki$(0)
- lset nexav$=mki$(1)
- lset kdel$=mki$(0)
- put 1,1
- close 1
- print "header created."
- print "opening index master ";
- open "o",1,mas$
- close 1
- open "r",1,mas$,recsize%
- field #1,recsize% as dummy$
- lset dummy$=string$(recsize%,0)
- put 1,1
- close 1
- print "done."
- print
- print "index may be used."
- end sub